#pragma once
#include <string>
#include "../../PocelainMacro.h"

#ifndef NDEBUG
#	define POCELAIN_RENDER_API_DEBUG
#endif

POCELAIN_NAMESPACE_BEGIN
#ifdef POCELAIN_RENDER_API_DEBUG
#define POCELAIN_OPENGL_CHECK_ERROR(tag)                                \
    do{OpenGLUtils::checkError(std::string(tag)+":"+__FILE__+":"+std::to_string(__LINE__));}while(0)
#else
#define POCELAIN_OPENGL_CHECK_ERROR(tag)
#endif
class OpenGLUtils
{
public:
    static void checkError(const std::string &tag);
    static std::string getErrorString(GLenum err);
    static std::string shaderSourceFormat(const std::string &shaderSource);
};
POCELAIN_NAMESPACE_END
